Practical Programming with Higher-Order Encodings and Dependent Types

نویسندگان

  • Adam Poswolsky
  • Carsten Schürmann
چکیده

Higher-order abstract syntax (HOAS) refers to the technique of representing variables of an object-language using variables of a meta-language. The standard first-order alternatives force the programmer to deal with superficial concerns such as substitutions, whose implementation is often routine, tedious, and error-prone. In this paper, we describe the underlying calculus of Delphin. Delphin is a fully implemented functional-programming language supporting reasoning over higher-order encodings and dependent types, while maintaining the benefits of HOAS. More specifically, just as representations utilizing HOAS free the programmer from concerns of handling explicit contexts and substitutions, our system permits programming over such encodings without making these constructs explicit, leading to concise and elegant programs. To this end our system distinguishes bindings of variables intended for instantiation from those that will remain uninstantiated, utilizing a variation of Miller and Tiu’s ∇-quantifier [1].

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Functional Programming with Logical Frameworks

Functional Programming with Logical Frameworks Adam Brett Poswolsky 2008 Logical frameworks are languages used to represent information. In this dissertation we present the Delphin programming language, which is a functional programming language with a logical framework supporting both higher-order abstract syntax and dependent types. Higher-order abstract syntax, or HOAS, refers to the techniq...

متن کامل

Towards Practical Functional Programming with Logical Frameworks Extended version

In this paper we show that the logical framework LF [6] extended by Σ-types serves as an excellent candidate for the representation of special purpose domains that are best encoded using higher-order abstract syntax and hypothetical judgments. It has an elegant meta-theory and Σ-types prove enormously useful in the design of a functional programming language Delphin that permits programmers to ...

متن کامل

Impredicative Encodings of (Higher) Inductive Types

Postulating an impredicative universe in dependent type theory allows System F style encodings of finitary inductive types, but these fail to satisfy the relevant η-equalities and consequently do not admit dependent eliminators. To recover η and dependent elimination, we present a method to construct refinements of these impredicative encodings, using ideas from homotopy type theory. We then ex...

متن کامل

What Functional Programmers can Learn from the Visitor Pattern

This paper explores the practical potential for enhancing code reuse in functional languages by leveraging techniques and experiences from object-oriented programming. Since data types in typed functional languages do not support adding new variants, programming techniques derived from the object-oriented Visitor pattern can be readily applied to recursive functions on trees in functional langu...

متن کامل

Dependent Types for Program Termination Verification

Program termination verification is a challenging research subject of significant practical importance. While there is already a rich body of literature on this subject, it is still undeniably a difficult task to design a termination checker for a realistic programming language that supports general recursion. In this paper, we present an approach to program termination verification that makes ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008